home *** CD-ROM | disk | FTP | other *** search
/ PD ROM 1 / PD ROM Volume I - Macintosh Software from BMUG (1988).iso / Stacks / Hyper Education / Mathematics / Mad Math Minute 2.0 / card_4626.txt < prev    next >
Encoding:
Text File  |  1988-04-19  |  2.4 KB  |  106 lines

  1. -- card: 4626 from stack: in.0
  2. -- bmap block id: 5197
  3. -- flags: 4000
  4. -- background id: 2601
  5. -- name: Finish
  6. ----- HyperTalk script -----
  7. on Evaluate
  8.   global CorrectAnswers
  9.   global WrongAnswers
  10.   hide card field "Results"
  11.   set the cursor to 4
  12.   set the lockScreen to true
  13.   go card "Problem"
  14.   get card field "Problem Number"
  15.   put it into pno
  16.   put 0 into checkline
  17.   repeat with l = 1 to pno
  18.     go card "Problem"
  19.     get line l of card field "ProblemList"
  20.     put it into answerText
  21.     put the value of it into answer
  22.     get line l of card field "AnswerList"
  23.     if it = answer then
  24.       add 1 to CorrectAnswers
  25.       --go card "Finish"
  26.       --add 1 to checkline
  27.       --put answerText && "  is  " && it into line checkline of --card field checklist
  28.       play "harpsichord"
  29.     else
  30.       if it > 0 and it <=20 then
  31.  
  32.         add 1 to WrongAnswers
  33.         go card "Finish"
  34.         add 1 to checkline
  35.         put answerText && "is not" && it into line checkline of card field checklist
  36.         play "boing"
  37.  
  38.       end if
  39.  
  40.     end if
  41.   end repeat
  42.   go card "Finish"
  43.   set the lockScreen to false
  44.   put "You got " & CorrectAnswers & " Problems right!" into line 1 of card field "Results"
  45.   put "You missed " & WrongAnswers & " Problems!" into line 2 of card field "Results"
  46.   show card field "Results"
  47.   put CorrectAnswers & return before line 1 of card field "record"
  48. end Evaluate
  49. on MouseUp
  50.   hide card field "Results"
  51.   go card "Start"
  52. end MouseUp
  53.  
  54.  
  55.  
  56. -- part 1 (field)
  57. -- low flags: 81
  58. -- high flags: 0000
  59. -- rect: left=128 top=195 right=238 bottom=345
  60. -- title width / last selected line: 0
  61. -- icon id / first selected line: 0 / 0
  62. -- text alignment: 0
  63. -- font id: 0
  64. -- text size: 12
  65. -- style flags: 0
  66. -- line height: 16
  67. -- part name: Results
  68.  
  69.  
  70. -- part 2 (field)
  71. -- low flags: 01
  72. -- high flags: 0007
  73. -- rect: left=396 top=25 right=336 bottom=488
  74. -- title width / last selected line: 0
  75. -- icon id / first selected line: 0 / 0
  76. -- text alignment: 0
  77. -- font id: 3
  78. -- text size: 9
  79. -- style flags: 0
  80. -- line height: 12
  81. -- part name: checklist
  82.  
  83.  
  84. -- part 3 (field)
  85. -- low flags: 01
  86. -- high flags: 0007
  87. -- rect: left=5 top=27 right=333 bottom=89
  88. -- title width / last selected line: 0
  89. -- icon id / first selected line: 0 / 0
  90. -- text alignment: 0
  91. -- font id: 3
  92. -- text size: 9
  93. -- style flags: 0
  94. -- line height: 12
  95. -- part name: record
  96.  
  97.  
  98. -- part contents for card part 1
  99. ----- text -----
  100. You got 30 Problems right!
  101. You missed 0 Problems!
  102.  
  103. -- part contents for card part 3
  104. ----- text -----
  105. 30
  106.